
<!-- 头部 -->
<!DOCTYPE html>
<html lang="zh-cn">
<head>
	
	<meta charset="utf-8"/>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<title>固管家服务平台</title>
	<meta name="description" content="index"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

	<!-- bootstrap & fontawesome -->
	<link rel="stylesheet" href="../../static/bootstrap/bootstrap.min.css"/>
	<link rel="stylesheet" href="../../static/css/font-awesome.min.css"/>
	<link rel="stylesheet" href="../../static/chosen/chosen.min.css"/>

	<!-- ace styles -->
	<link rel="stylesheet" href="../../static/ace/css/ace.min.css" id="main-ace-style"/>
	<link rel="stylesheet" href="../../static/ace/css/ace-skins.min.css"/>
	<link rel="stylesheet" href="../../static/ace/css/ace-rtl.min.css"/>
	<link rel="stylesheet" href="../../static/ztree/metro.css"/>
	<link rel="stylesheet" href="../../static/validate/css/validform.css"/>
	<link rel="stylesheet" href="../../static/css/custom.css"/>

	<!--[if !IE]> -->
	<script src="../../static/jquery/jquery.js"></script>
	<!-- <![endif]-->
	<!-- ace settings handler -->
	<script src="../../static/ace/js/ace-extra.min.js"></script>
</head>

<body class="no-skin" id="body-content">

<!-- 主体 -->
<div class="main-container" id="main-container">



	<div class="main-content">


		<div class="page-content">

			<div class="page-header">
				<h1> 测试运输方普通人员 编辑 </h1>
			</div>
			<div class="row">
				<div class="col-xs-12">
					<div id="fill-main-content" style="height:100%">
						<div class="xuboxPageHtml" id="xboxTest" style="overflow-y: auto; height: 516px;"><div class="layer">
							<form name="FormPost" id="role-save" class="FormGrid" method="post" action="role/save">

								<input type="hidden" value="27" name="id">
								<table class="EditTable" width="100%">
									<tbody>
									<tr class="FormData">
										<td class="CaptionTD">归属机构</td>
										<td class="DataTD width-100">

											<div class="clearfix width-100  input-group" style="">
												<input class="form-control search-query" type="text" readonly="" id="officeNameEdit" name="" value="固管家运输方测试机构" datatype="*" nullmsg="请选择归属机构">
												<span class="input-group-btn">
		<span class="btn btn-purple btn-sm" type="button" style="height: 34px;" data-mode="page" data-url="/guguanjia/manager/tag/treeselect" data-data="{url:'/guguanjia/manager/office/tree',id:'officeEdit',nameId:'officeNameEdit',pIdKey:'parentId',selectIds:'52',curId:'-1',checked:'false',rootNodeName:'',isLayer:'true'}" data-title="请选择" data-width="350px" data-height="400px">
			<i class="ace-icon fa fa-search bigger-110"></i>
			<a href="role-select.html">查找</a>
		</span>
	</span>
												<input type="hidden" name="officeId" id="officeEdit" value="52">
											</div>

										</td>
									</tr>
									<tr class="FormData">
										<td class="CaptionTD">角色名称</td>
										<td class="DataTD width-100"><input type="text" name="name" datatype="*" nullmsg="请输入角色名称！" value="测试运输方普通人员"></td>
									</tr>
									<tr class="FormData">
										<td class="CaptionTD">数据范围</td>
										<td class="DataTD width-100">
											<select class="chosen-select " name="dataScope" id="chosenSelectEdit" style="display: none;">
												<option value="1">所有数据</option>
												<option value="2">所在公司及以下数据</option>
												<option value="3">所在公司数据</option>
												<option value="4">所在部门及以下数据</option>
												<option value="5">所在部门数据</option>
												<option value="8" selected="selected">仅本人数据</option>
												<option value="9">按明细设置</option>
											</select>


											<span class="red width-50"> 特殊情况下,设置为"按明细设置",可进行跨机构授权</span>
										</td>
									</tr>
									<tr class="FormData">
										<td class="CaptionTD" style="vertical-align: top;">角色授权</td>
										<td class="DataTD">
											<div class="clearfix" style="width: 100%;display: inline-block;vertical-align: top;">

												<div id="treeSelectResEdit" style="width: 50%;display: inline-block;vertical-align: top;float: left">

													<div>
														<ul id="select-treetreeSelectResEdit" class="ztree" style="padding:15px 20px;">
															<li id="select-treetreeSelectResEdit_1" class="level0" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_1_switch" title="" class="button level0 switch root_open" treenode_switch=""></span><span id="select-treetreeSelectResEdit_1_check" class="button chk checkbox_false_part" treenode_check=""></span><a id="select-treetreeSelectResEdit_1_a" class="level0" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="权限列表"><span id="select-treetreeSelectResEdit_1_ico" title="" treenode_ico="" class="button ico_open" style=""></span><span id="select-treetreeSelectResEdit_1_span">权限列表</span></a>
																<ul id="select-treetreeSelectResEdit_1_ul" class="level0 " style="display:block">
																	<li id="select-treetreeSelectResEdit_2" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_2_switch" title="" class="button level1 switch center_open" treenode_switch=""></span><span id="select-treetreeSelectResEdit_2_check" class="button chk checkbox_true_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_2_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="个人中心"><span id="select-treetreeSelectResEdit_2_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-user" style=""></span><span id="select-treetreeSelectResEdit_2_span">个人中心</span></a>
																		<ul id="select-treetreeSelectResEdit_2_ul" class="level1 line">
																			<li id="select-treetreeSelectResEdit_3" class="level2" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_3_switch" title="" class="button level2 switch bottom_docu" treenode_switch=""></span><span id="select-treetreeSelectResEdit_3_check" class="button chk checkbox_true_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_3_a" class="level2" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="我的资料"><span id="select-treetreeSelectResEdit_3_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-file-o" style=""></span><span id="select-treetreeSelectResEdit_3_span">我的资料</span></a>
																			</li>
																		</ul>
																	</li>
																	<li id="select-treetreeSelectResEdit_4" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_4_switch" title="" class="button level1 switch center_open" treenode_switch=""></span><span id="select-treetreeSelectResEdit_4_check" class="button chk checkbox_true_part" treenode_check=""></span><a id="select-treetreeSelectResEdit_4_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="单位管理"><span id="select-treetreeSelectResEdit_4_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-lastfm" style=""></span><span id="select-treetreeSelectResEdit_4_span">单位管理</span></a>
																		<ul id="select-treetreeSelectResEdit_4_ul" class="level1 line">
																			<li id="select-treetreeSelectResEdit_5" class="level2" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_5_switch" title="" class="button level2 switch center_docu" treenode_switch=""></span><span id="select-treetreeSelectResEdit_5_check" class="button chk checkbox_true_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_5_a" class="level2" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="单位信息"><span id="select-treetreeSelectResEdit_5_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="select-treetreeSelectResEdit_5_span">单位信息</span></a></li>
																			<li id="select-treetreeSelectResEdit_6" class="level2" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_6_switch" title="" class="button level2 switch center_docu" treenode_switch=""></span><span id="select-treetreeSelectResEdit_6_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_6_a" class="level2" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="单位账号"><span id="select-treetreeSelectResEdit_6_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="select-treetreeSelectResEdit_6_span">单位账号</span></a></li>
																			<li id="select-treetreeSelectResEdit_7" class="level2" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_7_switch" title="" class="button level2 switch bottom_docu" treenode_switch=""></span><span id="select-treetreeSelectResEdit_7_check" class="button chk checkbox_true_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_7_a" class="level2" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="电子台账"><span id="select-treetreeSelectResEdit_7_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="select-treetreeSelectResEdit_7_span">电子台账</span></a></li>
																		</ul>
																	</li>
																	<li id="select-treetreeSelectResEdit_8" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_8_switch" title="" class="button level1 switch center_close" treenode_switch=""></span><span id="select-treetreeSelectResEdit_8_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_8_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="业务管理"><span id="select-treetreeSelectResEdit_8_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-puzzle-piece" style=""></span><span id="select-treetreeSelectResEdit_8_span">业务管理</span></a></li>
																	<li id="select-treetreeSelectResEdit_15" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_15_switch" title="" class="button level1 switch center_close" treenode_switch=""></span><span id="select-treetreeSelectResEdit_15_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_15_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="机构用户"><span id="select-treetreeSelectResEdit_15_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-group" style=""></span><span id="select-treetreeSelectResEdit_15_span">机构用户</span></a></li>
																	<li id="select-treetreeSelectResEdit_21" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_21_switch" title="" class="button level1 switch center_close" treenode_switch=""></span><span id="select-treetreeSelectResEdit_21_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_21_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="系统管理"><span id="select-treetreeSelectResEdit_21_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-cogs" style=""></span><span id="select-treetreeSelectResEdit_21_span">系统管理</span></a></li>
																	<li id="select-treetreeSelectResEdit_25" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectResEdit_25_switch" title="" class="button level1 switch bottom_close" treenode_switch=""></span><span id="select-treetreeSelectResEdit_25_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectResEdit_25_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="系统监控"><span id="select-treetreeSelectResEdit_25_ico" title="" treenode_ico="" class="button cusicon ace-icon ico fa fa-binoculars" style=""></span><span id="select-treetreeSelectResEdit_25_span">系统监控</span></a></li>
																</ul>
															</li>
														</ul>
													</div>
												</div>



												<div id="treeSelectOfficeEdit" style="width: 50%; display: none; vertical-align: top; float: right;">

													<div>
														<ul id="select-treetreeSelectOfficeEdit" class="ztree" style="padding:15px 20px;">
															<li id="select-treetreeSelectOfficeEdit_1" class="level0" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectOfficeEdit_1_switch" title="" class="button level0 switch root_open" treenode_switch=""></span><span id="select-treetreeSelectOfficeEdit_1_check" class="button chk checkbox_true_part" treenode_check=""></span><a id="select-treetreeSelectOfficeEdit_1_a" class="level0" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="机构列表"><span id="select-treetreeSelectOfficeEdit_1_ico" title="" treenode_ico="" class="button ico_open" style=""></span><span id="select-treetreeSelectOfficeEdit_1_span">机构列表</span></a>
																<ul id="select-treetreeSelectOfficeEdit_1_ul" class="level0 " style="display:block">
																	<li id="select-treetreeSelectOfficeEdit_2" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectOfficeEdit_2_switch" title="" class="button level1 switch center_docu" treenode_switch=""></span><span id="select-treetreeSelectOfficeEdit_2_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectOfficeEdit_2_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="新注册用户默认机构"><span id="select-treetreeSelectOfficeEdit_2_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="select-treetreeSelectOfficeEdit_2_span">新注册用户默认机构</span></a></li>
																	<li id="select-treetreeSelectOfficeEdit_3" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectOfficeEdit_3_switch" title="" class="button level1 switch center_docu" treenode_switch=""></span><span id="select-treetreeSelectOfficeEdit_3_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectOfficeEdit_3_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="重庆天志环保有限公司（长寿处置场）"><span id="select-treetreeSelectOfficeEdit_3_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="select-treetreeSelectOfficeEdit_3_span">重庆天志环保有限公司（长寿处置场）</span></a></li>
																	<li id="select-treetreeSelectOfficeEdit_4" class="level1" tabindex="0" hidefocus="true" treenode=""><span id="select-treetreeSelectOfficeEdit_4_switch" title="" class="button level1 switch center_docu" treenode_switch=""></span><span id="select-treetreeSelectOfficeEdit_4_check" class="button chk checkbox_false_full" treenode_check=""></span><a id="select-treetreeSelectOfficeEdit_4_a" class="level1" treenode_a="" onclick="" target="_blank" style="font-weight:normal;color:#333;" title="重庆天志环保有限公司（主城区处置场）"><span id="select-treetreeSelectOfficeEdit_4_ico" title="" treenode_ico="" class="button ico_docu" style=""></span><span id="select-treetreeSelectOfficeEdit_4_span">重庆天志环保有限公司（主城区处置场）</span></a></li>
																</ul>
															</li>
														</ul>
													</div>
												</div>


											</div>
										</td>
									</tr>
									</tbody>
								</table>
							</form>
						</div>

							<div class="width-100 clearfix" tag-save-btn="" style="bottom: -36px; left: 0px; position: absolute;">
	<span class="btn btn-primary btn-sm bigger-110 width-50  pull-left" id="role-save-save">
		<i class="ace-icon fa fa-floppy-o align-top bigger-125"></i> 确 定
	</span>
								<span class="btn btn-yellow btn-sm bigger-110 width-50 pull-right" id="role-save-cancel">
		<i class="ace-icon fa fa-times align-top  bigger-125"></i> 取 消
	</span>
							</div>

						</div>
					</div>

				</div>
			</div>
		</div><!-- /.page-content -->

	</div><!-- /.main-content -->

	<a href="javascript:void(0);" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"  style="z-index:1111">
		<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
	</a>
</div><!-- /.main-container -->

<!-- 底部 -->
<!-- basic scripts -->

<script src="../../static/bootstrap/bootstrap.min.js"></script>
<!-- ace scripts -->
<script src="../../static/ace/js/ace-elements.min.js"></script>
<script src="../../static/ace/js/ace.min.js"></script>

<script>
	$(function(){
		$("#chosenSelectEdit").chosen({width: "40%",search_contains: true});
	});
</script>
<script type="text/javascript">
	$("#chosenSelectEdit").change(function(){
		if($(this).val() == 9){
			$("#treeSelectOfficeEdit").show();
		}else{
			$("#treeSelectOfficeEdit").hide();
		}
	})
	$("#chosenSelectEdit option[value='8']").attr("selected",true);
	$("#chosenSelectEdit option[value='8']").trigger('change');
	$("#chosenSelectEdit").trigger("chosen:updated");
</script>
<script>
	var key, lastValue = "", nodeList = [];
	var treeSelectOfficeEdit, treeSelectOfficeEditsetting = {
		view:{selectedMulti:false,expandSpeed:100},
		check:{enable:true,nocheckInherit:true},
		data:{
			simpleData:{
				enable:true,
				idKey:"id",
				pIdKey:"parentId"
			},
			key:{url:"abcd11"}
		},
		view:{
			fontCss:function(treeId, treeNode) {
				return (!!treeNode.highlight) ? {"font-weight":"bold","color":"red"} : {"font-weight":"normal","color":"#333"};
			}
		},
		callback:{
			beforeClick:function(id, node){
				if("true" == "true"){
					treeSelectOfficeEdit.checkNode(node, !node.checked, true, true);
					return false;
				}
			}
		}
	};
	$(document).ready(function(){

		key = $("#key");
		key.bind("focus", focusKey).bind("blur", blurKey)
				.bind("change keydown cut input propertychange", searchNode);
		$("#treeselectid-save").click(function(){
			node = treeSelectOfficeEdit.getSelectedNodes()[0];
			if(undefined == node || null == node){
				tip.errorTip("请选择一个节点",$("#select-tree"));
				return false;
			}
			if("-1" == node.id){
				tip.errorTip("不能选择自己",$("#select-tree"));
				return false;
			}
			if(node.id == 0){
				node['name']="";
			}
			$("#treeselectname").val(node.name);
			$("#treeselectid").val(node["id"]);
			if("-1" != -1){
				$("input[name='parentIds']").val(node.parentIds);
			}
			layer.close(lastIndex);
			layer.close(layer.index);
		});
	});

	function getCheckbox(tree){
		var ids = [], nodes = tree.getCheckedNodes(true);
		for(var i=0; i<nodes.length; i++) {
			var id = nodes[i]["id"];
			if(id != 0) ids.push(id);
		}
		return ids;
	}

	function focusKey(e) {
		if (key.hasClass("empty")) {
			key.removeClass("empty");
		}
	};
	function blurKey(e) {
		if (key.get(0).value === "") {
			key.addClass("empty");
		}
		searchNode(e);
	};
	function searchNode(e) {
		// 取得输入的关键字的值
		var value = $.trim(key.get(0).value);

		// 按名字查询
		var keyType = "name";
		if (key.hasClass("empty")) {
			value = "";
		}

		// 如果和上次一次，就退出不查了。
		if (lastValue === value) {
			return;
		}

		// 保存最后一次
		lastValue = value;

		// 如果要查空字串，就退出不查了。
		if (value === "") {
			return;
		}
		updateNodes(false);
		nodeList = treeSelectOfficeEdit.getNodesByParamFuzzy(keyType, value);
		updateNodes(true);
	};
	function updateNodes(highlight) {
		for(var i=0, l=nodeList.length; i<l; i++) {
			nodeList[i].highlight = highlight;
			treeSelectOfficeEdit.updateNode(nodeList[i]);
			treeSelectOfficeEdit.expandNode(nodeList[i].getParentNode(), true, false, false);
		}
	};
</script>
<script>
	var key, lastValue = "", nodeList = [];
	var treeSelectResEdit, treeSelectResEditsetting = {
		view:{selectedMulti:false,expandSpeed:100},
		check:{enable:true,nocheckInherit:true},
		data:{
			simpleData:{
				enable:true,
				idKey:"id",
				pIdKey:"parentId"
			},
			key:{url:"abcd11"}
		},
		view:{
			fontCss:function(treeId, treeNode) {
				return (!!treeNode.highlight) ? {"font-weight":"bold","color":"red"} : {"font-weight":"normal","color":"#333"};
			}
		},
		callback:{
			beforeClick:function(id, node){
				if("true" == "true"){
					treeSelectResEdit.checkNode(node, !node.checked, true, true);
					return false;
				}
			}
		}
	};
	$(document).ready(function(){

		key = $("#key");
		key.bind("focus", focusKey).bind("blur", blurKey)
				.bind("change keydown cut input propertychange", searchNode);
		$("#treeselectid-save").click(function(){
			node = treeSelectResEdit.getSelectedNodes()[0];
			if(undefined == node || null == node){
				tip.errorTip("请选择一个节点",$("#select-tree"));
				return false;
			}
			if("-1" == node.id){
				tip.errorTip("不能选择自己",$("#select-tree"));
				return false;
			}
			if(node.id == 0){
				node['name']="";
			}
			$("#treeselectname").val(node.name);
			$("#treeselectid").val(node["id"]);
			if("-1" != -1){
				$("input[name='parentIds']").val(node.parentIds);
			}
			layer.close(lastIndex);
			layer.close(layer.index);
		});
	});

	function getCheckbox(tree){
		var ids = [], nodes = tree.getCheckedNodes(true);
		for(var i=0; i<nodes.length; i++) {
			var id = nodes[i]["id"];
			if(id != 0) ids.push(id);
		}
		return ids;
	}

	function focusKey(e) {
		if (key.hasClass("empty")) {
			key.removeClass("empty");
		}
	};
	function blurKey(e) {
		if (key.get(0).value === "") {
			key.addClass("empty");
		}
		searchNode(e);
	};

</script>

<!-- 引入其他js -->
<script src="../../static/js/history.js"></script>
<script type="text/javascript" src="../../static/layer/layer.js"></script>
<script type="text/javascript" src="../../static/js/spin.min.js"></script>
<script type="text/javascript" src="../../static/ztree/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.autosize.min.js"></script>
<script type="text/javascript" src="../../static/chosen/chosen.jquery.min.js"></script>
<script type="text/javascript" src="../../static/validate/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.form.js"></script>
<script type="text/javascript" src="../../static/js/bootstrap-contextmenu.js"></script>
<script type="text/javascript" src="../../static/js/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="../../static/js/public.js"></script>
<script type="text/javascript" src="../../static/vue/vue.js"></script>
<script type="text/javascript" src="../../static/vue/axios.js"></script>

<!--<script type="text/javascript" src="../../static/js/office/office.js"></script>-->


</body>
</html>
